﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyFitness.View
{
    public partial class MainMenuForm : Form
    {
        #region Declared Variables
        private string sessionID;
        public EventHandler AccountProfile;
        public EventHandler DailyInformation;
        public EventHandler PersonalGoals;
        public EventHandler Reports;
        public EventHandler TipsAndSuggestions;
        #endregion

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="sessionid">User SessionID</param>
        public MainMenuForm(string sessionid)
        {
            sessionID = sessionid;

            InitializeComponent();
            CenterToScreen();
        }

        /// <summary>
        /// On Account Profile Button Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AccountProfileButton_Click(object sender, EventArgs e)
        {
            if( AccountProfile != null )
                AccountProfile(sessionID, EventArgs.Empty);
        }

        /// <summary>
        /// On Daily Information Button Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DailyInformationButton_Click(object sender, EventArgs e)
        {
            if (DailyInformation != null)
                DailyInformation(sessionID, EventArgs.Empty);
        }

        /// <summary>
        /// On Personal Goals Button Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PersonalGoalsButton_Click(object sender, EventArgs e)
        {
            if (PersonalGoals != null)
                PersonalGoals(sessionID, EventArgs.Empty);
        }

        /// <summary>
        /// On Reports Button Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ReportsButton_Click(object sender, EventArgs e)
        {
            if (Reports != null)
                Reports(sessionID, EventArgs.Empty);
        }

        /// <summary>
        /// On Tips Ang Suggesstions Button Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TipsAndSuggestionsButton_Click(object sender, EventArgs e)
        {
            if (TipsAndSuggestions != null)
                TipsAndSuggestions(sessionID, EventArgs.Empty);
        }
    }
}
